home *** CD-ROM | disk | FTP | other *** search
- CONST nsamp = 128 ' number of samples
- CONST fs = 40 ' sample frequency Hz
- CONST w = 6.283185307# ' w=2*pi
- DIM n AS INTEGER ' sample #
- DIM t AS SINGLE ' time of sample
-
- OPEN "C:\WINPLOT\DATA_FFT.CSV" FOR OUTPUT AS #1 ' Open your output file
-
- FOR n = 1 TO nsamp
- t = t + 1 / fs ' t=1/f
- LOCATE 1, 1: PRINT n; ' display progress
- PRINT #1, t; ","; ' output X axis
- PRINT #1, SIN(5 * w * t) + 1 * SIN(8 * w * t) ' output Y axis
- NEXT n
-
- CLOSE #1
- END
-
-